/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BLL;

import DAL.Thanphien;
import DTO.dThanphien;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author nvc11190
 */
public class bThanphien {
    Thanphien tp = new Thanphien();
     int a;
     dThanphien dtp = new dThanphien();
    
    public ResultSet Loadthanphien1()
    {
        return tp.Loadthanphien1();
    }
    public ResultSet SearchKhach(String name)
    {
        return tp.SearchKhach(name);
    }
    public int Countthanphien() throws SQLException
    {
       
        ResultSet rs = tp.CountThanPhien();
        while(rs.next())
        {
             a = Integer.parseInt(rs.getObject(1).toString());
        }
        return a;
    }
    public int Addthanphien(dThanphien dtp) throws SQLException
    {
        return tp.AddThanphien(dtp);
    }
}
